<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>二维码生成器</title>
    <script src="js/jquery-3.6.0.js"></script>
    <style type="text/css">
        textarea {
            font-size: 16px;
            width: 300px;
            height: 100px;
        }
        h1{
            text-align: center;
            margin-top: 30px;
        }
        .qrCodeDiv {
            margin: auto;
            width: 400px;
            height: 400px;
            border: 2px solid sandybrown;
        }

        .qrCodeDiv img {
            max-height: 100%;
            max-width: 100%;
        }
    </style>
</head>
<body>
<div th:switch="${session.user.healthStatus}">
    <h1 th:case="0">健康码状态:绿码</h1>
    <h1 th:case="1">健康码状态:黄码</h1>
    <h1 th:case="2">健康码状态:红码</h1>
</div>
<div class="qrCodeDiv" id="codeImg" >
    <img th:src="@{/qrCode(healthStatus=${session.user.healthStatus})}">
</div>
</body>
</html>